<?php
namespace app\index\controller;

use app\index\controller\common as common;

use app\index\model\Category as Category;
use app\index\model\Assets as assetstable;
use app\index\validate\AsssetsInfoCheck;
use app\index\validate\AssetsAddCheck;
use app\index\Controller ;
// think\Loader::import('controller/Controller', \think\Config::get('traits_path') , EXT);

class Assets extends common
{

   use \app\index\traits\controller\Controller;
  
   public function get_cate_id(){
	   	/*验证参数*/
	    $validate = new AsssetsInfoCheck();
	    list($msg,$result)= $validate->goapiCheck();
	    if($msg){
		   	list($msg,$result) = Category::get_cate_id() ;
		    }
	    return returnresult($msg,$result) ;    	 
	}

    public function add_assets()
    {
        /*验证参数*/
        $validate = new AssetsAddCheck();
        list($msg,$result)= $validate->goapiCheck();     
        if($msg){
            // 添加数据 
            list($msg,$result) = assetstable::add_data();
        }
        return returnresult($msg,$result) ;    
    }


}

